home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility1 / gs261src.zip / BC.MAK < prev    next >
Text File  |  1993-05-29  |  9KB  |  291 lines

  1. #    Copyright (C) 1989, 1990, 1991, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2. #
  3. # This file is part of Ghostscript.
  4. #
  5. # Ghostscript is distributed in the hope that it will be useful, but
  6. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. # to anyone for the consequences of using it or for whether it serves any
  8. # particular purpose or works at all, unless he says so in writing.  Refer
  9. # to the Ghostscript General Public License for full details.
  10. #
  11. # Everyone is granted permission to copy, modify and redistribute
  12. # Ghostscript, but only under the conditions described in the Ghostscript
  13. # General Public License.  A copy of this license is supposed to have been
  14. # given to you along with Ghostscript so you can know your rights and
  15. # responsibilities.  It should be in a file named COPYING.  Among other
  16. # things, the copyright notice and this notice must be preserved on all
  17. # copies.
  18.  
  19. # makefile for Ghostscript, MS-DOS/Borland C++ platform.
  20.  
  21. # ------------------------------- Options ------------------------------- #
  22.  
  23. ###### This section is the only part of the file you should need to edit.
  24.  
  25. # ------ Generic options ------ #
  26.  
  27. # Define the default directory/ies for the runtime
  28. # initialization and font files.  Separate multiple directories with \;.
  29. # Use / to indicate directories, not a single \.
  30.  
  31. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  32.  
  33. # Define the name of the Ghostscript initialization file.
  34. # (There is no reason to change this.)
  35.  
  36. GS_INIT=gs_init.ps
  37.  
  38. # Choose generic configuration options.
  39.  
  40. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  41. # Code runs substantially slower even if no debugging switches are set,
  42. # and also takes about another 25K of memory.
  43.  
  44. DEBUG=0
  45.  
  46. # Setting TDEBUG=1 includes symbol table information for the Borland debugger,
  47. # and also enables stack checking.  Code is substantially slower and larger.
  48.  
  49. TDEBUG=0
  50.  
  51. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  52. # so they are visible to the debugger and profiler.
  53. # No execution time or space penalty, just larger .OBJ and .EXE files.
  54.  
  55. NOPRIVATE=0
  56.  
  57. # Define the name of the executable file.
  58.  
  59. GS=gs
  60.  
  61. # ------ Platform-specific options ------ #
  62.  
  63. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  64. # and set ASM to the name of the assembler you are using.  This can be
  65. # a full path name if you want.  Normally it will be masm or tasm.
  66.  
  67. USE_ASM=1
  68. ASM=tasm
  69.  
  70. # Define the drive, directory, and compiler name for the Turbo C files.
  71. # COMP is the compiler name (tcc for Turbo C++, bcc for Borland C++).
  72. # COMPDIR contains the compiler and linker (normally \bc\bin).
  73. # BGIDIR contains the BGI files (normally /bc/bgi).
  74. #   BGIDIRSTR must be the same as BGIDIR with / substituted for \.
  75. #   (These are only needed if you include the BGI driver.)
  76. # INCDIR contains the include files (normally \bc\include).
  77. # LIBDIR contains the library files (normally \bc\lib).
  78. # Note that these prefixes are always followed by a \,
  79. #   so if you want to use the current directory, use an explicit '.'.
  80.  
  81. COMP=bcc
  82. COMPDIR=c:\bc\bin
  83. BGIDIR=c:\bc\bgi
  84. # BGIDIRSTR must be the same as BGIDIR with / substituted for \.
  85. BGIDIRSTR=c:/bc/bgi
  86. INCDIR=c:\bc\include
  87. LIBDIR=c:\bc\lib
  88.  
  89. # Define whether you want to use the Borland code overlay mechanism
  90. # (VROOMM).  Code overlays make it possible to process larger files,
  91. # but code swapping will slow Ghostscript down even on smaller ones.
  92. # See the file overlay.h to control details of overlaying such as
  93. # the overlay buffer size, whether to use EMS and/or extended memory
  94. # to store evicted overlays, and how much of that memory to use.
  95.  
  96. OVERLAY=1
  97.  
  98. # Choose platform-specific options.
  99.  
  100. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  101. # (The 8086 and 8088 both correspond to processor type 86.)
  102. # 286 and up do not use protected mode.  Higher numbers produce
  103. # code that may be significantly smaller and faster, but the executable
  104. # will bail out with an error message on lower-numbered processor types.
  105.  
  106. CPU_TYPE=286
  107.  
  108. # Define the math coprocessor (FPU) type.
  109. # Options are -1 (optimize for no FPU), 0 (optimize for FPU present,
  110. # but do not require a FPU), 87, 287, or 387.
  111. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  112. # CPU includes the equivalent of an 80387 on-chip.
  113. # An xx87 option means that the executable will run only if a FPU
  114. # of that type (or higher) is available: this is NOT currently checked
  115. # at runtime.
  116.  
  117. FPU_TYPE=0
  118.  
  119. # ---------------------------- End of options ---------------------------- #
  120.  
  121. # Swapping `make' out of memory makes linking much faster.
  122.  
  123. .swap
  124.  
  125. # Define the platform name.
  126.  
  127. PLATFORM=bc_
  128.  
  129. # Define the name of the makefile -- used in dependencies.
  130.  
  131. MAKEFILE=bc.mak
  132.  
  133. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  134. # but we need to preconstruct ccf.tr to get around the limit on
  135. # the maximum length of a command line.
  136.  
  137. AK=ccf.tr
  138.  
  139. # Define the compilation flags for an 80286.
  140. # This is void because we handle -2 and -3 in ccf.tr (see below).
  141.  
  142. F286=
  143.  
  144. # Figure out which version of Borland C++ we are running.
  145. # In the MAKE program that comes with Borland C++ 2.0, __MAKE__ is 0x300;
  146. # in the MAKE that comes with Borland C++ 3.0 and 3.1, it is 0x360.
  147. # We care because 3.0 has additional optimization features.
  148. # There are also some places below where we distinguish BC++ 3.1 from 3.0
  149. #   by testing whether $(INCDIR)\win30.h exists (true in 3.1, false in 3.0).
  150.  
  151. EXIST_BC3_1=exist $(INCDIR)\win30.h
  152.  
  153. !if $(__MAKE__) >= 0x360
  154. CO=-Obe -Z
  155. !else
  156. CO=-O
  157. !endif
  158.  
  159. !include "tccommon.mak"
  160.  
  161. # Define the compilation flags.
  162.  
  163. !if $(NOPRIVATE)
  164. CP=-DNOPRIVATE
  165. !else
  166. CP=
  167. !endif
  168.  
  169. !if $(DEBUG) | $(TDEBUG)
  170. CS=-N
  171. !else
  172. CS=
  173. !endif
  174.  
  175. !if $(DEBUG)
  176. CD=-DDEBUG
  177. !else
  178. CD=
  179. !endif
  180.  
  181. !if $(TDEBUG)
  182. CT=-v
  183. LCT=/v
  184. !else
  185. CT=-y
  186. LCT=/m /l
  187. !endif
  188.  
  189. GENOPT=$(CP) $(CS) $(CD) $(CT)
  190.  
  191. !if $(OVERLAY)
  192. CY=-Y
  193. CYO=-Yo -zAOVLY
  194. LO=/oOVLY
  195. LIBOVL=$(LIBDIR)\overlay
  196. OVLH=overlay.h
  197. !else
  198. CY=
  199. CYO=
  200. LO=
  201. LIBOVL=
  202. OVLH=
  203. !endif
  204.  
  205. CCFLAGS0=$(GENOPT) $(PLATOPT) $(FPFLAGS)
  206. CCFLAGS=$(CCFLAGS0) -m$(MM)
  207. CC=$(COMPDIR)\$(COMP) -m$(MM) -zEGS_FAR_DATA @ccf.tr
  208. CCC=$(CC) $(CYO) $(CO) -c
  209. CCD=$(CC) $(CYO) -O -c
  210. CCCF=$(COMPDIR)\$(COMP) -mh @ccf.tr $(CYO) -O -c
  211. CCINT=$(CC) $(CYO) -Obet -c
  212.  
  213. .c.obj:
  214.     $(CCC) { $<}
  215.  
  216. # ------ Devices and features ------ #
  217.  
  218. # Choose the language feature(s) to include.  See gs.mak for details.
  219. # Even though code overlays are available, we don't include most of the
  220. # optional features, because they cost a significant amount of non-code space.
  221.  
  222. FEATURE_DEVS=filter.dev dps.dev level2.dev
  223.  
  224. # Choose the device(s) to include.  See devs.mak for details.
  225. # We don't include the BGI driver, because it takes 10K of
  226. # non-overlayable code space.
  227.  
  228. DEVICE_DEVS=vga.dev ega.dev vesa.dev
  229. DEVICE_DEVS2=atiw.dev s3vga.dev tseng.dev tvga.dev
  230. DEVICE_DEVS3=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  231. DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev
  232. DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev
  233. DEVICE_DEVS6=bj10e.dev bj200.dev
  234. DEVICE_DEVS8=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev
  235. !include "gs.mak"
  236. !include "devs.mak"
  237.  
  238. # Build the compiler response file depending on the selected options.
  239.  
  240. ccf.tr: $(MAKEFILE) makefile
  241. !if $(CPU_TYPE) < 286
  242.     echo -a -d -r -G -X -I$(INCDIR) $(CCFLAGS0) >ccf.tr
  243. !else
  244.     echo -2 -a -d -r -G -X -I$(INCDIR) $(CCFLAGS0) >ccf.tr
  245. !  if $(CPU_TYPE) > 286
  246.     echo -3 -a -d -r -G -X -I$(INCDIR) $(CCFLAGS0) >_temp_
  247.     if $(EXIST_BC3_1) copy _temp_ ccf.tr
  248. !  endif
  249. !endif
  250.  
  251. # -------------------------------- Library -------------------------------- #
  252.  
  253. # The Turbo/Borland C(++) platform
  254.  
  255. bc__=gp_itbc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ)
  256. bc_.dev: $(bc__)
  257.     $(SHP)gssetmod bc_ $(bc__)
  258.  
  259. # We have to compile gp_itbc without -1, because it includes a run-time
  260. # check to make sure we are running on the right kind of processor.
  261. gp_itbc.$(OBJ): gp_itbc.c $(string__h) $(gx_h) $(gp_h) \
  262.  $(OVLH) $(MAKEFILE) makefile
  263.     $(CC) $(CCFLAGS) -1- $(CY) -DCPU_TYPE=$(CPU_TYPE) -c gp_itbc.c
  264.  
  265. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  266.  
  267. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  268.  
  269. # ----------------------------- Main program ------------------------------ #
  270.  
  271. BEGINFILES=ccf.tr
  272. CCBEGIN=$(CCC) *.c
  273.  
  274. # Get around the fact that the DOS shell has a rather small limit on
  275. # the length of a command line.  (sigh)
  276.  
  277. LIBCTR=libc$(MM).tr
  278.  
  279. $(LIBCTR): $(MAKEFILE) makefile
  280.     echo $(LIBOVL) $(LIBDIR)\$(FPLIB) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM) >$(LIBCTR)
  281.  
  282. LIBDOS=$(LIBGS) obj.tr
  283.  
  284. # Interpreter main program
  285.  
  286. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\
  287.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr
  288.  
  289. $(GS)$(XE): $(GS_ALL) $(ALL_DEVS)
  290.     $(COMPDIR)\tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @obj.tr $(INTASM) @gs.tr ,$(GS),$(GS),@lib.tr @$(LIBCTR)
  291.